package com.elastic.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@TableName("tb_hotel")
@Document(indexName = "hotel")
public class Hotel {

    @TableId(type = IdType.INPUT)
    @Id
    private Long id;
    @Field(name = "name")
    private String name;

    @Field(name="address")
    private String address;

    private Integer price;
    private Integer score;
    private String brand;
    private String city;

    @Field(name = "starName",type = FieldType.Text,analyzer = "ik_smart")
    private String starName;
    private String business;
    private Double longitude;
    private Double latitude;
    private String pic;
}


